package net.dopan.pigframe.demo.service.impl;

import net.dopan.pigframe.core.base.service.impl.BaseServiceImpl;
import net.dopan.pigframe.demo.mapper.UserActivityParticipantMapper;
import net.dopan.pigframe.demo.model.entity.UserActivityParticipant;
import net.dopan.pigframe.demo.service.UserActivityParticipantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class UserActivityParticipantServiceImpl extends BaseServiceImpl<UserActivityParticipantMapper, UserActivityParticipant> implements UserActivityParticipantService {

    @Autowired
    private UserActivityParticipantMapper userActivityParticipantMapper;
//    @Override
//    public List<UserActivityParticipant> findAll(Integer activityId) {
//        return userActivityParticipantMapper.selectList(null);
//    }

    @Override
    public Boolean addUserActivityParticipant(UserActivityParticipant userActivityParticipant) {
        userActivityParticipantMapper.insert(userActivityParticipant);
        return true;
    }
}
